home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Languages Suite
/
ProgramD2.iso
/
Borland
/
Borland C++ V5.02
/
GDIDEMO.PAK
/
ARTYPRIV.H
< prev
next >
Wrap
C/C++ Source or Header
|
1997-05-06
|
2KB
|
69 lines
//----------------------------------------------------------------------------
// ObjectWindows
// Copyright (c) 1991, 1995 by Borland International, All Rights Reserved
//
// Helper classes used internally by the TArtyWindow
//----------------------------------------------------------------------------
#if !defined(ARTYINTERNAL_H)
#define ARTYINTERNAL_H
#include <winsys\color.h>
class _EXPCLASS TDC;
class _EXPCLASS TPen;
// Arty demo constants
const int MaxLineCount = 100;
const int MaxIconicLineCount= 5;
const int MaxColorDuration = 10;
struct TLineRec {
int LX1,LY1, LX2,LY2;
TColor Color;
};
class TList {
public:
TList(int _max);
void Redraw(TDC&);
void ResetLines();
void ScaleTo(int, int);
void LineTick(TDC&);
protected:
TLineRec Line[MaxLineCount];
int Xmax, Ymax;
void AdjustX(int&, int&);
void AdjustY(int&, int&);
virtual void DrawLine(TDC&, int);
virtual void EraseLine(TDC&, int);
void SelectNewColor();
void SelectNewDeltaValues();
private:
int MaxLines;
int X1, Y1, X2, Y2;
int MaxDelta;
int ColorDuration;
int IncrementCount;
int DeltaX1, DeltaY1, DeltaX2, DeltaY2;
int CurrentLine;
long PenColor;
};
// Quads draw 4 reflections of each line
//
class TQuadList : public TList {
public:
TQuadList(int _max) : TList(_max) {}
void DrawLine(TDC&, int);
void EraseLine(TDC&, int);
};
#endif // ARTYINTERNAL_H